const articleListUrl = '/api/articleList'
const viewAllDeptUrl = '/pay/wx/viewAllDept' // 按部门层级获取全部结果数据接口
const viewDeptUserUrl = '/pay/wx/viewDeptUser' // 获取部门下人员详细信息数据接口 (左下动态表)
const viewThirtyDaysDataUrl = '/pay/wx/viewThirtyDaysData' // 获取30天数据模块 (折线图)
const viewPaihangUrl = '/pay/wx/viewPaihang' // 排行榜模块 (排行榜)
export const yibiaoData = {
  number: 2345,
  total: 5678
}

export const bingTuData = [
  { value: 1048, name: '搜索引擎' },
  { value: 735, name: '直接访问' },
  { value: 580, name: '邮件营销' },
  { value: 484, name: '联盟广告1' },
  { value: 484, name: '联盟广告2' },
  { value: 484, name: '联盟广告3' },
  { value: 484, name: '联盟广告4' }
]

export const lunbobiaoData = [
  ['组件1', 'dev-1', "<span  class='colorGrass'>↑75%</span>"],
  ['组件2', 'dev-2', "<span  class='colorRed'>↓33%</span>"],
  ['组件3', 'dev-3', "<span  class='colorGrass'>↑100%</span>"],
  ['组件4', 'rea-1', "<span  class='colorGrass'>↑94%</span>"],
  ['组件5', 'rea-2', "<span  class='colorGrass'>↑95%</span>"],
  ['组件6', 'fix-2', "<span  class='colorGrass'>↑63%</span>"],
  ['组件7', 'fix-4', "<span  class='colorGrass'>↑84%</span>"],
  ['组件8', 'fix-7', "<span  class='colorRed'>↓46%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件9', 'dev-2', "<span  class='colorRed'>↓13%</span>"],
  ['组件10', 'dev-9', "<span  class='colorGrass'>↑76%</span>"]
]

export const lunbozhuData = [
  {
    name: '周口',
    value: 55
  },
  {
    name: '南阳',
    value: 120
  },
  {
    name: '西峡',
    value: 78
  },
  {
    name: '驻马店',
    value: 66
  },
  {
    name: '新乡',
    value: 80
  },
  {
    name: '信阳',
    value: 45
  },
  {
    name: '漯河',
    value: 29
  },
  {
    name: 'aaa',
    value: 19
  },
  {
    name: 'bbb',
    value: 9
  },
  {
    name: 'ccc',
    value: 2
  }
]
export const zhexianData = {
  date: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
    11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
    21, 22, 23, 24, 25, 26, 27, 28, 29, 30
  ],
  data: [
    {
      name: '公司人数',
      type: 'line',
      smooth: true,
      stack: '总量',
      data: [120, 132, 101, 14, 90, 30, 10, 66, 77, 88,
        10, 12, 11, 14, 90, 20, 10, 66, 77, 88,
        120, 132, 11, 134, 90, 20, 10, 66, 77, 8]
    },
    {
      name: '迟到人数',
      type: 'line',
      smooth: true,
      stack: '总量',
      data: [10, 12, 101, 14, 90, 30, 10, 66, 7, 88,
        109, 124, 111, 114, 90, 20, 110, 66, 77, 88,
        12, 132, 11, 134, 50, 210, 10, 66, 77, 8]
    },
    {
      name: '请假人数',
      type: 'line',
      smooth: true,
      stack: '总量',
      data: [120, 12, 10, 134, 90, 30, 130, 66, 77, 88,
        140, 12, 131, 14, 930, 20, 130, 66, 77, 88,
        120, 132, 131, 134, 90, 20, 10, 66, 77, 8]
    },
    {
      name: '应出勤人数',
      type: 'line',
      smooth: true,
      stack: '总量',
      data: [120, 12, 101, 144, 90, 30, 10, 66, 77, 88,
        140, 12, 141, 14, 90, 240, 10, 66, 77, 88,
        120, 132, 141, 134, 90, 20, 10, 66, 77, 8]
    },
    {
      name: '出差人数',
      type: 'line',
      smooth: true,
      stack: '总量',
      data: [10, 132, 101, 154, 90, 30, 150, 66, 77, 88,
        10, 152, 151, 14, 90, 20, 10, 66, 77, 88,
        120, 132, 151, 134, 90, 20, 10, 66, 77, 8]
    }, {
      name: '出勤人数',
      type: 'line',
      smooth: true,
      stack: '总量',
      data: [10, 132, 101, 154, 90, 30, 150, 66, 77, 88,
        10, 152, 151, 14, 90, 20, 10, 66, 77, 88,
        120, 132, 151, 134, 90, 20, 10, 66, 77, 8]
    },
    {
      name: '休息人数',
      type: 'line',
      smooth: true,
      stack: '总量',
      data: [10, 132, 101, 154, 90, 30, 150, 66, 77, 88,
        10, 152, 151, 14, 90, 20, 10, 66, 77, 88,
        120, 132, 151, 134, 90, 20, 10, 66, 77, 8]
    }
  ]
}
export default ({ service, request, serviceForMock, requestForMock, mock, faker, tools }) => ({

  articleListApi () {
    return request({
      url: articleListUrl,
      method: 'get'
    })
  },
  viewAllDeptApi (deptId) {
    const id = deptId || 'deptId'
    console.log(deptId)
    return request({
      url: viewAllDeptUrl + '?deptId=' + id,
      method: 'get'
    })
  },
  viewDeptUserApi (deptId) {
    const url = deptId ? viewDeptUserUrl + '?deptId=' + deptId : viewDeptUserUrl
    return request({
      url,
      method: 'get'
    })
  },
  viewThirtyDaysDataApi (deptId) {
    const url = deptId ? viewThirtyDaysDataUrl + '?deptId=' + deptId : viewThirtyDaysDataUrl
    return request({
      url,
      method: 'get'
    })
  },
  viewPaihangUrlApi (deptId) {
    const url = deptId ? viewPaihangUrl + '?deptId=' + deptId : viewPaihangUrl
    return request({
      url,
      method: 'get'
    })
  }
})
